#include "io_led.h"
#include "driver/gpio.h"

#define LIGHTS_IO_PIN 48
#define OUT_PIN_SEL (1ULL<<LIGHTS_IO_PIN)

int device_led_init()
{
    gpio_config_t io_conf = {};
    io_conf.intr_type = GPIO_INTR_DISABLE;
    io_conf.mode = GPIO_MODE_OUTPUT;
    io_conf.pin_bit_mask = OUT_PIN_SEL;
    gpio_config(&io_conf);
    return 0;
}

int device_led_set(unsigned char state)
{
    gpio_set_level(LIGHTS_IO_PIN,state);
    return 0;
}